<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>PredicatedMap (Apache Commons Collections 4.0 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="PredicatedMap (Apache Commons Collections 4.0 API)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PredicatedMap.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/collections4/map/PassiveExpiringMap.ExpirationPolicy.html" title="interface in org.apache.commons.collections4.map"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/commons/collections4/map/PredicatedSortedMap.html" title="class in org.apache.commons.collections4.map"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/collections4/map/PredicatedMap.html" target="_top">Frames</a></li>
<li><a href="PredicatedMap.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.collections4.map</div>
<h2 title="Class PredicatedMap" class="title">Class PredicatedMap&lt;K,V&gt;</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/commons/collections4/map/AbstractIterableMap.html" title="class in org.apache.commons.collections4.map">org.apache.commons.collections4.map.AbstractIterableMap</a>&lt;K,V&gt;</li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/commons/collections4/map/AbstractMapDecorator.html" title="class in org.apache.commons.collections4.map">org.apache.commons.collections4.map.AbstractMapDecorator</a>&lt;K,V&gt;</li>
<li>
<ul class="inheritance">
<li>org.apache.commons.collections4.map.PredicatedMap&lt;K,V&gt;</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;K,V&gt;, <a href="../../../../../org/apache/commons/collections4/Get.html" title="interface in org.apache.commons.collections4">Get</a>&lt;K,V&gt;, <a href="../../../../../org/apache/commons/collections4/IterableGet.html" title="interface in org.apache.commons.collections4">IterableGet</a>&lt;K,V&gt;, <a href="../../../../../org/apache/commons/collections4/IterableMap.html" title="interface in org.apache.commons.collections4">IterableMap</a>&lt;K,V&gt;, <a href="../../../../../org/apache/commons/collections4/Put.html" title="interface in org.apache.commons.collections4">Put</a>&lt;K,V&gt;</dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../../../org/apache/commons/collections4/map/PredicatedSortedMap.html" title="class in org.apache.commons.collections4.map">PredicatedSortedMap</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">PredicatedMap&lt;K,V&gt;</span>
extends <a href="../../../../../org/apache/commons/collections4/map/AbstractMapDecorator.html" title="class in org.apache.commons.collections4.map">AbstractMapDecorator</a>&lt;K,V&gt;
implements <a href="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></pre>
<div class="block">Decorates another <code>Map</code> to validate that additions
 match a specified predicate.
 <p>
 This map exists to provide validation for the decorated map.
 It is normally created to decorate an empty map.
 If an object cannot be added to the map, an IllegalArgumentException is thrown.
 <p>
 One usage would be to ensure that no null keys are added to the map.
 <pre>Map map = PredicatedSet.decorate(new HashMap(), NotNullPredicate.INSTANCE, null);</pre>
 <p>
 <strong>Note that PredicatedMap is not synchronized and is not thread-safe.</strong>
 If you wish to use this map from multiple threads concurrently, you must use
 appropriate synchronization. The simplest approach is to wrap this map
 using <a href="http://download.oracle.com/javase/6/docs/api/java/util/Collections.html?is-external=true#synchronizedMap(java.util.Map)" title="class or interface in java.util"><code>Collections.synchronizedMap(Map)</code></a>. This class may throw
 exceptions when accessed by concurrent threads without synchronization.
 <p>
 This class is Serializable from Commons Collections 3.1.</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>3.0</dd>
<dt><span class="strong">Version:</span></dt>
  <dd>$Id: PredicatedMap.java 1479407 2013-05-05 22:07:53Z tn $</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../serialized-form.html#org.apache.commons.collections4.map.PredicatedMap">Serialized Form</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="nested_classes_inherited_from_class_java.util.Map">
<!--   -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;java.util.<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a></h3>
<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</a>&lt;<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">K</a>,<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">V</a>&gt;</code></li>
</ul>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super <a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">K</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html#keyPredicate">keyPredicate</a></strong></code>
<div class="block">The key predicate to use</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super <a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html#valuePredicate">valuePredicate</a></strong></code>
<div class="block">The value predicate to use</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colLast" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html#PredicatedMap(java.util.Map, org.apache.commons.collections4.Predicate, org.apache.commons.collections4.Predicate)">PredicatedMap</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">K</a>,<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a>&gt;&nbsp;map,
             <a href="../../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super <a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">K</a>&gt;&nbsp;keyPredicate,
             <a href="../../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super <a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a>&gt;&nbsp;valuePredicate)</code>
<div class="block">Constructor that wraps (not copies).</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html#checkSetValue(V)">checkSetValue</a></strong>(<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a>&nbsp;value)</code>
<div class="block">Override to validate an object set into the map via <code>setValue</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</a>&lt;K,V&gt;&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html#entrySet()">entrySet</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html#isSetValueChecking()">isSetValueChecking</a></strong>()</code>
<div class="block">Override to only return true when there is a value transformer.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;K,V&gt;&nbsp;<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="class in org.apache.commons.collections4.map">PredicatedMap</a>&lt;K,V&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html#predicatedMap(java.util.Map, org.apache.commons.collections4.Predicate, org.apache.commons.collections4.Predicate)">predicatedMap</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;K,V&gt;&nbsp;map,
             <a href="../../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super K&gt;&nbsp;keyPredicate,
             <a href="../../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super V&gt;&nbsp;valuePredicate)</code>
<div class="block">Factory method to create a predicated (validating) map.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html#put(K, V)">put</a></strong>(<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">K</a>&nbsp;key,
   <a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a>&nbsp;value)</code>
<div class="block">Note that the return type is Object, rather than V as in the Map interface.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html#putAll(java.util.Map)">putAll</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;? extends <a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">K</a>,? extends <a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a>&gt;&nbsp;mapToCopy)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html#validate(K, V)">validate</a></strong>(<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">K</a>&nbsp;key,
        <a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a>&nbsp;value)</code>
<div class="block">Validates a key value pair.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.commons.collections4.map.AbstractMapDecorator">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.commons.collections4.map.<a href="../../../../../org/apache/commons/collections4/map/AbstractMapDecorator.html" title="class in org.apache.commons.collections4.map">AbstractMapDecorator</a></h3>
<code><a href="../../../../../org/apache/commons/collections4/map/AbstractMapDecorator.html#clear()">clear</a>, <a href="../../../../../org/apache/commons/collections4/map/AbstractMapDecorator.html#containsKey(java.lang.Object)">containsKey</a>, <a href="../../../../../org/apache/commons/collections4/map/AbstractMapDecorator.html#containsValue(java.lang.Object)">containsValue</a>, <a href="../../../../../org/apache/commons/collections4/map/AbstractMapDecorator.html#decorated()">decorated</a>, <a href="../../../../../org/apache/commons/collections4/map/AbstractMapDecorator.html#equals(java.lang.Object)">equals</a>, <a href="../../../../../org/apache/commons/collections4/map/AbstractMapDecorator.html#get(java.lang.Object)">get</a>, <a href="../../../../../org/apache/commons/collections4/map/AbstractMapDecorator.html#hashCode()">hashCode</a>, <a href="../../../../../org/apache/commons/collections4/map/AbstractMapDecorator.html#isEmpty()">isEmpty</a>, <a href="../../../../../org/apache/commons/collections4/map/AbstractMapDecorator.html#keySet()">keySet</a>, <a href="../../../../../org/apache/commons/collections4/map/AbstractMapDecorator.html#remove(java.lang.Object)">remove</a>, <a href="../../../../../org/apache/commons/collections4/map/AbstractMapDecorator.html#size()">size</a>, <a href="../../../../../org/apache/commons/collections4/map/AbstractMapDecorator.html#toString()">toString</a>, <a href="../../../../../org/apache/commons/collections4/map/AbstractMapDecorator.html#values()">values</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.commons.collections4.map.AbstractIterableMap">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.commons.collections4.map.<a href="../../../../../org/apache/commons/collections4/map/AbstractIterableMap.html" title="class in org.apache.commons.collections4.map">AbstractIterableMap</a></h3>
<code><a href="../../../../../org/apache/commons/collections4/map/AbstractIterableMap.html#mapIterator()">mapIterator</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a name="keyPredicate">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>keyPredicate</h4>
<pre>protected final&nbsp;<a href="../../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super <a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">K</a>&gt; keyPredicate</pre>
<div class="block">The key predicate to use</div>
</li>
</ul>
<a name="valuePredicate">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>valuePredicate</h4>
<pre>protected final&nbsp;<a href="../../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super <a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a>&gt; valuePredicate</pre>
<div class="block">The value predicate to use</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="PredicatedMap(java.util.Map, org.apache.commons.collections4.Predicate, org.apache.commons.collections4.Predicate)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>PredicatedMap</h4>
<pre>protected&nbsp;PredicatedMap(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">K</a>,<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a>&gt;&nbsp;map,
             <a href="../../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super <a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">K</a>&gt;&nbsp;keyPredicate,
             <a href="../../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super <a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a>&gt;&nbsp;valuePredicate)</pre>
<div class="block">Constructor that wraps (not copies).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>map</code> - the map to decorate, must not be null</dd><dd><code>keyPredicate</code> - the predicate to validate the keys, null means no check</dd><dd><code>valuePredicate</code> - the predicate to validate to values, null means no check</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the map is null</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="predicatedMap(java.util.Map, org.apache.commons.collections4.Predicate, org.apache.commons.collections4.Predicate)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>predicatedMap</h4>
<pre>public static&nbsp;&lt;K,V&gt;&nbsp;<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="class in org.apache.commons.collections4.map">PredicatedMap</a>&lt;K,V&gt;&nbsp;predicatedMap(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;K,V&gt;&nbsp;map,
                                     <a href="../../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super K&gt;&nbsp;keyPredicate,
                                     <a href="../../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super V&gt;&nbsp;valuePredicate)</pre>
<div class="block">Factory method to create a predicated (validating) map.
 <p>
 If there are any elements already in the list being decorated, they
 are validated.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>K</code> - the key type</dd><dd><code>V</code> - the value type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>map</code> - the map to decorate, must not be null</dd><dd><code>keyPredicate</code> - the predicate to validate the keys, null means no check</dd><dd><code>valuePredicate</code> - the predicate to validate to values, null means no check</dd>
<dt><span class="strong">Returns:</span></dt><dd>a new predicated map</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the map is null</dd><dt><span class="strong">Since:</span></dt>
  <dd>4.0</dd></dl>
</li>
</ul>
<a name="validate(java.lang.Object,java.lang.Object)">
<!--   -->
</a><a name="validate(K, V)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>validate</h4>
<pre>protected&nbsp;void&nbsp;validate(<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">K</a>&nbsp;key,
            <a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a>&nbsp;value)</pre>
<div class="block">Validates a key value pair.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key to validate</dd><dd><code>value</code> - the value to validate</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if invalid</dd></dl>
</li>
</ul>
<a name="checkSetValue(java.lang.Object)">
<!--   -->
</a><a name="checkSetValue(V)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkSetValue</h4>
<pre>protected&nbsp;<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a>&nbsp;checkSetValue(<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a>&nbsp;value)</pre>
<div class="block">Override to validate an object set into the map via <code>setValue</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>value</code> - the value to validate</dd>
<dt><span class="strong">Returns:</span></dt><dd>the value itself</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if invalid</dd><dt><span class="strong">Since:</span></dt>
  <dd>3.1</dd></dl>
</li>
</ul>
<a name="isSetValueChecking()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSetValueChecking</h4>
<pre>protected&nbsp;boolean&nbsp;isSetValueChecking()</pre>
<div class="block">Override to only return true when there is a value transformer.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if a value predicate is in use</dd><dt><span class="strong">Since:</span></dt>
  <dd>3.1</dd></dl>
</li>
</ul>
<a name="put(java.lang.Object,java.lang.Object)">
<!--   -->
</a><a name="put(K, V)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>put</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a>&nbsp;put(<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">K</a>&nbsp;key,
    <a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a>&nbsp;value)</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../../org/apache/commons/collections4/Put.html#put(K, V)">Put</a></code></strong></div>
<div class="block">Note that the return type is Object, rather than V as in the Map interface.
 See the class Javadoc for further info.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#put(K, V)" title="class or interface in java.util">put</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">K</a>,<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a>&gt;</code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/collections4/Put.html#put(K, V)">put</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/collections4/Put.html" title="interface in org.apache.commons.collections4">Put</a>&lt;<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">K</a>,<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a>&gt;</code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/collections4/map/AbstractMapDecorator.html#put(K, V)">put</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/commons/collections4/map/AbstractMapDecorator.html" title="class in org.apache.commons.collections4.map">AbstractMapDecorator</a>&lt;<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">K</a>,<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a>&gt;</code></dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#put(K, V)" title="class or interface in java.util"><code>Map.put(Object, Object)</code></a></dd></dl>
</li>
</ul>
<a name="putAll(java.util.Map)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putAll</h4>
<pre>public&nbsp;void&nbsp;putAll(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;? extends <a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">K</a>,? extends <a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a>&gt;&nbsp;mapToCopy)</pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#putAll(java.util.Map)" title="class or interface in java.util">putAll</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">K</a>,<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a>&gt;</code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/collections4/Put.html#putAll(java.util.Map)">putAll</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/collections4/Put.html" title="interface in org.apache.commons.collections4">Put</a>&lt;<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">K</a>,<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a>&gt;</code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/collections4/map/AbstractMapDecorator.html#putAll(java.util.Map)">putAll</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/commons/collections4/map/AbstractMapDecorator.html" title="class in org.apache.commons.collections4.map">AbstractMapDecorator</a>&lt;<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">K</a>,<a href="../../../../../org/apache/commons/collections4/map/PredicatedMap.html" title="type parameter in PredicatedMap">V</a>&gt;</code></dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#putAll(java.util.Map)" title="class or interface in java.util"><code>Map.putAll(Map)</code></a></dd></dl>
</li>
</ul>
<a name="entrySet()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>entrySet</h4>
<pre>public&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util">Map.Entry</a>&lt;K,V&gt;&gt;&nbsp;entrySet()</pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#entrySet()" title="class or interface in java.util">entrySet</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;K,V&gt;</code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/collections4/Get.html#entrySet()">entrySet</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/collections4/Get.html" title="interface in org.apache.commons.collections4">Get</a>&lt;K,V&gt;</code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/collections4/map/AbstractMapDecorator.html#entrySet()">entrySet</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/commons/collections4/map/AbstractMapDecorator.html" title="class in org.apache.commons.collections4.map">AbstractMapDecorator</a>&lt;K,V&gt;</code></dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true#entrySet()" title="class or interface in java.util"><code>Map.entrySet()</code></a></dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PredicatedMap.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/collections4/map/PassiveExpiringMap.ExpirationPolicy.html" title="interface in org.apache.commons.collections4.map"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/commons/collections4/map/PredicatedSortedMap.html" title="class in org.apache.commons.collections4.map"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/collections4/map/PredicatedMap.html" target="_top">Frames</a></li>
<li><a href="PredicatedMap.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2001&#x2013;2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>
